<?php

namespace app\api\controller;

use think\Controller;

class System extends Controller
{
    /**
     * 检测版本
     */
    public function system($header, $data, $user)
    {
        $system=db('system')
            ->find();
        $hot_search=explode('|',$system['hot_search']);
        //热门搜索词
        $hot_search=array_slice($hot_search,0,10);
        //获取前10个
        $return=array(
            'mobile'=>$system['mobile'],
            'freight'=>$system['freight'],
            'exempt_freight_price'=>$system['exempt_freight_price'],
            'start_img'=>$system['start_img'],
            'hot_search'=>$hot_search,
        );
        return array('code' => 1, 'msg' => '系统数据', 'data' => $return);
    }
}